import { _ as r } from "./attr-item.vue_vue_type_script_setup_true_lang.ABkxhIcO.js";
import { D as c } from "./index.C1xHoEFy.js";
import { p as m, c as t, h as b } from "./index.Bbfhrq76.js";
import { f as n } from "./vendor.CF2kwqqq.js";
let f = [
  {
    parameter: "Database Connection Pooling Service",
    message: "请选择数据库连接池服务"
  },
  {
    parameter: "db-fetch-db-type",
    message: "请选择数据库获取数据库类型"
  },
  {
    parameter: "qdbtr-record-writer",
    message: "请选择qdbtr-record-writer"
  }
];
const v = () => ({ name: [
  "org.apache.nifi.processors.standard.QueryDatabaseTableRecord_2_0"
], excludeKeys: [
  "Database Connection Pooling Service",
  "db-fetch-db-type",
  "qdbtr-record-writer",
  "db-fetch-sql-query",
  "Table Name",
  "web预留（自动填入）"
], selfFormColumn: [
  {
    assignKey: "Database Connection Pooling Service",
    tag: r,
    ":data": "formData.config.properties"
  },
  {
    assignKey: "db-fetch-db-type",
    tag: r,
    ":data": "formData.config.properties"
  },
  {
    assignKey: "qdbtr-record-writer",
    tag: r,
    ":data": "formData.config.properties"
  },
  // {
  //   prop: "config.properties.Database Connection Pooling Service",
  //   assignKey: "Database Connection Pooling Service",
  //   tag: ElSelect,
  //   filterable: true,
  //   placeholder: "",
  // },
  // {
  //   prop: "config.properties.db-fetch-db-type",
  //   assignKey: "db-fetch-db-type",
  //   tag: ElSelect,
  //   placeholder: "",
  // },
  // {
  //   prop: "config.properties.qdbtr-record-writer",
  //   assignKey: "qdbtr-record-writer",
  //   tag: ElSelect,
  //   placeholder: "",
  // },
  {
    tag: c,
    ":formData": "formData",
    prop: "config.properties['Database Connection Pooling Service']",
    propOutput: "config.properties['web预留（自动填入）']",
    isFormElem: !1,
    setup({ params: a }) {
      return {
        disabled: a.step.value === "running"
      };
    },
    ":disabled": "disabled"
  }
], hooksSubmit: (a, d) => {
  var i;
  let e = (i = d.event.form) == null ? void 0 : i.data.value[a.id].config.properties;
  m(e, f);
  let { databaseType: o, tableName: s, sqlQuery: p } = JSON.parse(
    e["web预留（自动填入）"]
  );
  o || t("请选择数据源"), s || t("请选择表"), e["db-fetch-db-type"] && b[e["db-fetch-db-type"]] !== o && t("数据库获取数据库类型应与数据源类型一致"), n(e, "Table Name", s), n(e, "db-fetch-sql-query", p);
} });
export {
  v as default
};
